package cn.javaee.springmvc.service;

import org.springframework.beans.factory.annotation.Autowired;

import cn.javaee.springmvc.model.Address;
import cn.javaee.springmvc.model.Login;
import cn.javaee.springmvc.model.User;

public class UserServiceImpl implements UserService {

	  @Autowired
	  public UserDao userDao;
	  

	  public User validateUser(Login login) {
	    return userDao.validateUser(login);
	  }

	public int registerUser(User user) {
		return userDao.registerUser(user);
	}

	public int registerAddress(User user, Address address) {
		return  userDao.registerAddress(user, address);
		
	}

	}